import configparser
from www import get_city_code
from www import get_pagenumber
from www import get_page


def main():
    cf=configparser.ConfigParser()
    cf.read("51job.conf",encoding='utf-8')
    keyword=str(cf.get('51job','keyword')).split(',')
    city=str(cf.get('51job','city')).split(',')
    for c in city:
        city_code=get_city_code()[c]
        for k in keyword:
            pageNumber=get_pagenumber(city_code,k)
            get_page(k,pageNumber,city_code)

if __name__ == '__main__':
    main()
